package com.twang.stock.controller.old;

import com.twang.stock.entity.GaiNianZiJingPaiHang;
import com.twang.stock.service.jinyan.QinXUZhiShuService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 *
 */
@Controller
@RequestMapping(value = "/gaiNian")
@Slf4j
public class GaiNianController {

    @Autowired
    private QinXUZhiShuService qinXUZhiShuService;

    /**
     * 情绪指数
     * @return
     */
    @RequestMapping(value = "/query")
    public ModelAndView query(){
        ModelAndView modelAndView=new ModelAndView();
        modelAndView.addObject("resultList",  qinXUZhiShuService.queryList());
        modelAndView.setViewName("qinxuzhishu");
        return  modelAndView;
    }

    /**
     * 情绪指数-核心
     * @return
     */
    @RequestMapping(value = "/core")
    public ModelAndView core(){
        ModelAndView modelAndView=new ModelAndView();
        modelAndView.addObject("resultList",  qinXUZhiShuService.queryCoreList());
        modelAndView.setViewName("qingxuCore");
        return  modelAndView;
    }

    /**
     * 情绪指数-核心
     * @return
     */
    @RequestMapping(value = "/板块")
    public ModelAndView 板块(GaiNianZiJingPaiHang request){
        ModelAndView modelAndView=new ModelAndView();
        modelAndView.addObject("resultList",  qinXUZhiShuService.queryGaiNianPaiHang(request));
        modelAndView.setViewName("bankuai");
        return  modelAndView;
    }
    /**
     * 短线-推荐
     * @return
     */
    @RequestMapping(value = "/duanxian")
    public ModelAndView duanxian(GaiNianZiJingPaiHang request){
        ModelAndView modelAndView=new ModelAndView();
        modelAndView.addObject("resultList",  qinXUZhiShuService.duanxian());
        modelAndView.setViewName("qinxuzhishu");
        return  modelAndView;
    }

}
